package com.wzbc.video.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wzbc.video.entity.LessonMessage;
import com.wzbc.video.entity.Role;
import com.wzbc.video.mapper.LessonMessageMapper;
import com.wzbc.video.mapper.RoleMapper;
import com.wzbc.video.res.LessonMessageRes;
import com.wzbc.video.service.LessonMessageService;
import com.wzbc.video.service.RoleService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LessonMessageServiceImpl extends ServiceImpl<LessonMessageMapper, LessonMessage> implements LessonMessageService {
    @Override
    public List<LessonMessageRes> getMessages(Long id) {
        return this.baseMapper.getMessages(new QueryWrapper<LessonMessageRes>().eq("lesson_message.lesson_id",id));
    }
}
